// 封装用户模块的vueX

import { getToken } from "@/utils/storage"


export default{
  namespaced:true,
  state: {
    token:getToken() || ''
  },
  getters: {
  },
  mutations: {
    upToken(state,newToken){
        state.token = newToken
    },
    setToken (state, newToken) {
      state.token = newToken
      setToken(newToken)
    }
  },
  actions: {
  },
  modules: {
  }
}